--[[------------------------------------
			APEX FRAMEWORK
	Developed by Ren, from zDark.com
------------------------------------]]--

function GM:DrawDeathNotice()
	return false
end

function APEX.HudDisplay( pl )

	local health = LocalPlayer():Health()
	local credits = "OFF"
	local nick = LocalPlayer():Nick()
	local ping = LocalPlayer():Ping()
	local svname = GetHostName()
	
	surface.SetDrawColor( 0, 0, 0, 235 )
	surface.DrawRect( 0, 0, ScrW(), 25 )
	
	surface.SetTextColor( 255, 255, 255, 255 )
	surface.SetTextPos( 15, 2 )
	surface.SetFont( 'Trebuchet19' )
	//surface.DrawText( 'zDark.com |' )
	surface.DrawText( svname )
	
	//surface.SetTextColor( 255, 75, 75, 255 )
	//surface.SetTextPos( 15, 2 )
	//surface.SetFont( 'Trebuchet19' )
	//surface.DrawText( '                      Apex' )
	
	// Health Transition
	if health > 50 then
	surface.SetTextColor( 100, 255, 100, 255 )
	surface.SetTextPos( ScrW()-80, 3 )
	surface.SetFont( 'DefaultSmall' )
	surface.DrawText( 'Health' )
	
	surface.SetTextColor( 100, 255, 100, 255 )
	surface.SetTextPos( ScrW()-50, 3 )
	surface.SetFont( 'Trebuchet19' )
	surface.DrawText( health )
	
	elseif health < 51 then
	surface.SetTextColor( 255, 100, 100, 255 )
	surface.SetTextPos( ScrW()-80, 3 )
	surface.SetFont( 'DefaultSmall' )
	surface.DrawText( 'Health' )
	
	surface.SetTextColor( 255, 100, 100, 255 )
	surface.SetTextPos( ScrW()-50, 3 )
	surface.SetFont( 'Trebuchet19' )
	surface.DrawText( health )
	end
	// Health Transition
	
	surface.SetTextColor( 0, 200, 255, 255 )
	surface.SetTextPos( ScrW()-185, 3 )
	surface.SetFont( 'DefaultSmall' )
	surface.DrawText( 'Credits' )
	
	surface.SetTextColor( 0, 200, 255, 255 )
	surface.SetTextPos( ScrW()-150, 3 )
	surface.SetFont( 'Trebuchet19' )
	surface.DrawText( credits )
	
	surface.SetTextColor( 255, 255, 0, 255 )
	surface.SetTextPos( ScrW()-260, 3 )
	surface.SetFont( 'DefaultSmall' )
	surface.DrawText( 'Ping' )
	
	surface.SetTextColor( 255, 255, 0, 255 )
	surface.SetTextPos( ScrW()-235, 3 )
	surface.SetFont( 'Trebuchet19' )
	surface.DrawText( ping )
	
	surface.SetTextColor( 255, 255, 255, 100 )
	surface.SetTextPos( ScrW()-100, ScrH()-15 ) 
	surface.SetFont('DefaultSmall')
	surface.DrawText( 'APEX HUD: 1.0.1.1' )
	
	surface.SetTextColor( 127, 167, 255, 100 )
	surface.SetTextPos( ScrW()-97, ScrH()-50 ) 
	surface.SetFont('HUDNumber')
	surface.DrawText( 'APEX' )
	
end
hook.Add( 'HUDPaint', 'APEX.HudDisplay', APEX.HudDisplay )

function APEX.HideHud( name )
	for k, v in pairs{'CHudHealth', 'CHudBattery'} do
		if name == v then return false end
	end
end
hook.Add('HUDShouldDraw', 'APEX.HideHud', APEX.HideHud)